#pragma once

#include "afxwin.h"
#include "DockPaneWnd.h"
#include "GridCtrl\GridCtrl.h"
#include "DockingPane.h"

class	CMainFrame;

class CResiduePane : public CDockingPaneWnd
{
	// Construction
public:
	CResiduePane(){ m_bSelectionChanged = FALSE; m_displayStyle = ONE_RESIDUE; }

	CGridCtrl			m_residueGridCtrl;
	CXTPToolBar			m_wndToolBar;

	virtual CString GetName() { return "Residue Pane"; }

	// Attributes
public:
	//	
	virtual HRESULT OnUpdate();
	virtual void	Delete();

	void UpdateResidueFromPDBSelection();

	enum { ONE_RESIDUE, ONE_RESIDUE_INDEX, ONE_RESIDUE_INDEX_NUMBER, THREE_RESIDUE, THREE_RESIDUE_INDEX, THREE_RESIDUE_INDEX_NUMBER };
	INT32	m_displayStyle;

	void	SetGridCtrlText();

	// Operations
public:

	// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CResiduePane)
	//}}AFX_VIRTUAL

	// Implementation
public:
	virtual ~CResiduePane(){}

	BOOL	m_bSelectionChanged;
	void	UpdatePDBFromGridCtrl();

	// Generated message map functions
protected:
	//{{AFX_MSG(CResiduePane)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT32 nType, INT32 cx, INT32 cy);
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
	afx_msg int OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl);
	afx_msg void OnUpdateDisplaySelected(CCmdUI * cmdUI);
	afx_msg void OnDisplaySelected();
	afx_msg void OnUpdateSelectionOption(CCmdUI * cmdUI);
	afx_msg void OnSelectionOption();
	afx_msg void OnSelectionChanged(NMHDR* pNMHDR, LRESULT* pResult);
public:

public:
	afx_msg void OnDestroy();
public:
	afx_msg void OnTimer(UINT_PTR nIDEvent);
};

